home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kate / plugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-01-15  |  2.3 KB  |  88 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
  3.    Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
  4.  
  5.    This library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License version 2 as published by the Free Software Foundation.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19.  
  20. #ifndef _KATE_PLUGIN_INCLUDE_
  21. #define _KATE_PLUGIN_INCLUDE_
  22.  
  23. #include <qwidget.h>
  24. #include <qpixmap.h>
  25. #include <kicontheme.h>
  26.  
  27. #include <kurl.h>
  28.  
  29. namespace Kate
  30. {
  31.  
  32. class Application;
  33. class MainWindow;
  34.  
  35. class KDE_EXPORT Plugin : public QObject
  36. {
  37.   friend class PrivatePlugin;
  38.  
  39.   Q_OBJECT
  40.  
  41.   public:
  42.     Plugin (Application *application = 0, const char *name = 0 );
  43.     virtual ~Plugin ();
  44.  
  45.     unsigned int pluginNumber () const;
  46.  
  47.     Application *application() const;
  48.  
  49.   private:
  50.     class PrivatePlugin *d;
  51.     static unsigned int globalPluginNumber;
  52.     unsigned int myPluginNumber;
  53. };
  54.  
  55. KDE_EXPORT Plugin *createPlugin ( const char* libname, Application *application = 0, const char *name = 0,const QStringList &args = QStringList() );
  56.  
  57. /*
  58.  * view plugin class
  59.  * this plugin will be bound to a ktexteditor::view
  60.  */
  61. class KDE_EXPORT PluginViewInterface
  62. {
  63.   friend class PrivatePluginViewInterface;
  64.  
  65.   public:
  66.     PluginViewInterface ();
  67.     virtual ~PluginViewInterface ();
  68.  
  69.     unsigned int pluginViewInterfaceNumber () const;
  70.  
  71.     /*
  72.      * will be called from the part to bound the plugin to a view
  73.      */
  74.     virtual void addView (MainWindow *) = 0;
  75.     virtual void removeView (MainWindow *) = 0;
  76.  
  77.   private:
  78.     class PrivatePluginViewInterface *d;
  79.     static unsigned int globalPluginViewInterfaceNumber;
  80.     unsigned int myPluginViewInterfaceNumber;
  81. };
  82.  
  83. KDE_EXPORT PluginViewInterface *pluginViewInterface (Plugin *plugin);
  84.  
  85. }
  86.  
  87. #endif
  88.